package com.ruoyi.system.domain;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 课堂评论对象 course_comments
 * 
 * @author zrj
 * @date 2025-07-15
 */

@Data
public class CourseComments extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 评论唯一标识，自增生成 */
    private Long commentUid;

    /** 关联的课程ID */
    @Excel(name = "关联的课程ID")
    private Long relatedCourseId;

    /** 父评论ID（为空时为顶层评论） */
    @Excel(name = "父评论ID", readConverterExp = "为=空时为顶层评论")
    private Long parentCommentUid;

    /** 评论人用户ID */
    @Excel(name = "评论人用户ID")
    private Long userId;

    /** 评论内容 */
    @Excel(name = "评论内容")
    private String content;

    /** 评论图片URL，多图用逗号分隔 */
    @Excel(name = "评论图片URL，多图用逗号分隔")
    private String images;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("commentUid", getCommentUid())
            .append("relatedCourseId", getRelatedCourseId())
            .append("parentCommentUid", getParentCommentUid())
            .append("userId", getUserId())
            .append("content", getContent())
            .append("images", getImages())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
